package behavioral_pattern.memento_pattern;

import java.util.ArrayList;

/**
 * 备忘录管理人
 */
public class MementoCaretaker {
 private final ArrayList<ChessmanMemento> mementoArrayList = new ArrayList<>();



    public ChessmanMemento getMemento(int i) {
        return mementoArrayList.get(i);
    }

    public void setMemento(ChessmanMemento memento) {
       mementoArrayList.add(memento);
    }
}
